import React from 'react';
import Router from '@/router/index';
import ReactDOM from 'react-dom/client';

import 'antd/dist/reset.css';
import zh_CN from 'antd/locale/zh_CN';
import { App, ConfigProvider, message } from 'antd';
import { StyleProvider, legacyLogicalPropertiesTransformer } from '@ant-design/cssinjs';

import 'dayjs/locale/zh-cn';

message.config({ prefixCls: 'kitty' });

window.loadingFlag = true;

const rootobj = ReactDOM.createRoot(document.getElementById('kittyRoot'));
rootobj.render(
    <ConfigProvider locale={zh_CN} prefixCls={'kitty'} iconPrefixCls={'kitty-anticon'}>
        <StyleProvider hashPriority={'high'} transformers={[legacyLogicalPropertiesTransformer]}>
            <App message={{ top: 50, maxCount: 1 }}>
                <Router />
            </App>
        </StyleProvider>
    </ConfigProvider>
);
